package com.hra.logger.utils;

import com.hra.logger.collector.BaseLogCollector;
import com.hra.logger.collector.CrashLogCollector;
import com.hra.logger.collector.EventsLogCollector;
import com.hra.logger.collector.KernelLogCollector;
import com.hra.logger.collector.MainLogCollector;
import com.hra.logger.collector.RadioLogCollector;
import com.hra.logger.collector.SystemLogCollector;

public final class LogFactory {
    private static final KernelLogCollector mKernelLog = new KernelLogCollector();
    private static final MainLogCollector mMainLog = new MainLogCollector();
    private static final SystemLogCollector mSystemLog = new SystemLogCollector();
    private static final CrashLogCollector mCrashLog = new CrashLogCollector();
    private static final RadioLogCollector mRadioLog = new RadioLogCollector();
    private static final EventsLogCollector mEventsLog = new EventsLogCollector();

    public static BaseLogCollector getLogCollector(int logType) {
        switch (logType) {
            case Utils.LOG_TYPE_KERNEL:
                return mKernelLog;
            case Utils.LOG_TYPE_MAIN:
                return mMainLog;
            case Utils.LOG_TYPE_SYSTEM:
                return mSystemLog;
            case Utils.LOG_TYPE_CRASH:
                return mCrashLog;
            case Utils.LOG_TYPE_RADIO:
                return mRadioLog;
            case Utils.LOG_TYPE_EVENTS:
                return mEventsLog;
            default:
                return null;
        }
    }
}
